<template>
  <div class="goods_nav_container">
    <div class="item" v-for="(item, index) in navList" :key="index" :class="{ active: currentIndex === index }"
      @click="currentIndex = index">
      {{ item }}
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';

const currentIndex = ref<number>(0);
const navList = [
  '猜你喜欢',
];
</script>

<style lang="less" scoped>
@import '../../../assets/css/primary/index.less';

.goods_nav_container {
  box-sizing: content-box;
  padding: 5px 0;
  height: 40px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;

  .item {
    width: 120px;
    border-radius: 20px;
    text-align: center;
    line-height: 40px;
    margin-right: 10px;
    font-size: 16px;
    background-color: #f3f3f3;
    cursor: pointer;
  }

  .active {
    background-color: @primary-color;
  }
}
</style>
